package io.zhaocy.exception.mvc.controller;

import io.zhaocy.exception.mvc.model.User;
import io.zhaocy.exception.mvc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description:
 *
 * @Author: genezhao
 * @Date: 2018-07-05
 */
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping("/getUser/{id}")
    public User getUserById(@PathVariable String id) {
        return userService.getUserById(id);
    }
}
